package com.wky1.wang1.Exception;

import com.wky1.wang1.Request;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
//全局异常处理器
@RestControllerAdvice
public class AllException {
    @ExceptionHandler(Exception.class)
    public Request ex(Exception e){
        e.printStackTrace();
        return Request.error("操作失败，请联系管理员");
    }
}
